<?php
mysql_connect('localhost','root','shenna4254');
mysql_select_db('ragnarok');
$rss = '<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>RSS Jeth-RO</title>
<link>http://www.jeth-ro.com</link>
<description>Dynamic Data From www.jeth-ro.com</description>';
$task = $_GET['task'];
if($task == "pvpladder5"){	
	$query = "SELECT * FROM pvpladder ORDER BY exp DESC LIMIT 5";
	$result = mysql_query($query);
	$show = mysql_num_rows($result);
	$rss .= '<show>'.$show.'</show>';
	while($row = mysql_fetch_array($result)){
		$rss .= '<item>
					<title>'.$row['name'].'</title>
					<link>http://www.jeth-ro.com/profile.php?char='.$row['char_id'].'</link>
				 </item>';
	}
}
$rss .= '</channel></rss>';
echo $rss;
?>